import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path:'/',
      redirect:"login"
    },
    {
      path:'/login',
      name:'login',
      component: ()=>import("../views/login")
    },
    {
      path: '/index',
      name: 'login',
      component: ()=>import("../views/index"),
      children:[
        {
          path:'welcome',
          name:'welcome',
          component:()=>import("../views/welcome")
        },
        {
          path: 'acc',
          name: 'acc',
          component:()=>import("../views/account/index")
        },
        {
          path: 'cate',
          name: 'cate',
          component:()=>import("../views/cate/index")
        },
        {
          path: 'dept',
          name: 'dept',
          component:()=>import("../views/dept/index")
        },
        {
          path: 'stu',
          name: 'stu',
          component:()=>import("../views/stu/index")
        }
      ]
    }
  ]
})
